USERNAME = group14
ASSIGNMENT = 04
SERVER = 138.232.64.210
PORT = 22113
FILES = Collision.cpp assignment04.txt

CXXFLAGS += -O0 -Wall -g -fopenmp
LDFLAGS += 

BINS = Example

SRCS = Collision.cpp HashFunction.cpp HashValue.cpp md5.c
HDRS = Collision.hpp HashFunction.hpp HashValue.hpp md5.h
OBJS = Collision.o   HashFunction.o   HashValue.o   md5.o

DEPSFILE = .depend

.PHONY: upload sense clean

all: $(BINS)

upload:
	touch check
	scp -P $(PORT) check $(FILES) $(USERNAME)@$(SERVER):assignment$(ASSIGNMENT)

sense:
	scp -P $(PORT) $(USERNAME)@$(SERVER):log.txt $(USERNAME)@$(SERVER):compile.log .
	tail compile.log log.txt

clean:
	rm -f $(BINS) $(OBJS) $(DEPSFILE) check log.txt compile.log

$(BINS): %: %.cpp $(HDRS) $(OBJS) $(DEPSFILE)
	$(CXX) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(OBJS)

$(DEPSFILE): $(SRCS)
	$(CXX) -MM $(SRCS) > $(DEPSFILE)

-include $(DEPSFILE)
